package com.victualler.product.goods.controller;

import com.victualler.core.common.dto.PageDto;
import com.victualler.product.goods.entity.GoodsMainDao;
import com.victualler.product.goods.dto.GoodsDto;
import com.victualler.product.goods.dto.request.GoodsShowRequestDto;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

public interface GoodsController {


	public GoodsDto saveGoods(GoodsDto goodsDto);

	public GoodsDto getGoodsById(Long id);

	public GoodsDto updateGoods(@RequestBody GoodsDto goodsDto);

	/**
	 * @author Guoshichang
	 * @since 13:39 on 2018/7/7.
	 * @param goodsShowRequestDto
	 * @param pageNo
	 * @param limit
	 * @Function  根据条件入参PermissionRequestDto动态分页查询权限
	 */
	@RequestMapping("/getGoodsByRequestDto")
	public PageDto<GoodsMainDao> getGoodsByRequestDto(@RequestBody GoodsShowRequestDto goodsShowRequestDto, @RequestParam("pageNo") int pageNo, @RequestParam("limit") int limit);

	/**
	 * @author Guoshichang
	 * @since 13:39 on 2018/7/7.
	 * @param goodsShowRequestDto
	 * @param pageNo
	 * @param limit
	 * @Function  根据条件入参PermissionRequestDto动态分页查询权限
	 */
	@RequestMapping("/getGoodsByRequestDtoByIndex")
	public PageDto<GoodsMainDao> getGoodsByRequestDtoByIndex(@RequestBody GoodsShowRequestDto goodsShowRequestDto, @RequestParam("pageNo") int pageNo, @RequestParam("limit") int limit);

	/**
	 * @author Guoshichang
	 * @since 21:05 on 2018/12/7.
	 * @Function  统一刷条形码
	 */
	@RequestMapping("/flushModelBarId")
	public void flushModelBarId();
}
